Skip to main content

Random Variable

A random variable is function from the sample space SS to the set of all real numbers R\R. we can denote such function as X(s):SRX(s): S\to \R

  • Discrete(countable)
  • Continuous(Uncountable)
  • Joint

For each type random variables, we conclude serval distribution where probability distribution depicts the expected outcomes of given random.

Intro to Discrete

A random variable is discrete if there is a finite of countable sequences of distinct events xix_i and corresponding sequence pip_i of real numbers satisfied ipi=1\sum_i p_i = 1 and P(X=xi)=piP(X=x_i) = p_i

  • The probability function of discrete random variable called Probability Mass Function(PMF) write as pX:R[0,1],pX(x)=P(X=x)p_X: \R \to [0,1], p_X(x) = P(X= x)
  • For the second equation, firstly, consider limnP(X=x)=limnn(n1)(nx+1)x!θx(1θ)nx\lim\limits_{n\to \infty} P(X = x) = \lim\limits_{n\to \infty} \frac{n(n-1)\cdots(n-x+1)}{x!} \theta^x(1-\theta)^{n-x} , where θ=λn\theta = \frac{\lambda}{n} that is we can rearrange to n(n1)(nx+1)(λx)x!nx=n(n1)(nx+1)nxλxx!\frac{n(n-1)\cdots(n-x+1)(\lambda^x)}{x!n^x} = \frac{n(n-1)\cdots(n-x+1)}{n^x} \frac{\lambda^x}{x!}. And we can find out that limnn(n1)(nx+1)nxλxx!=λxx!\lim\limits_{n\to \infty} \frac{n(n-1)\cdots(n-x+1)}{n^x} \frac{\lambda^x}{x!} = \frac{\lambda^x}{x!}. That is, we have limnP(X=x)=limnλxx!(1λn)nx\lim\limits_{n\to \infty} P(X = x) = \lim\limits_{n\to \infty} \frac{\lambda^x}{x!}(1-\frac{\lambda}{n})^{n-x}. Since limn(1λn)x=1\lim\limits_{n\to \infty}(1-\frac{\lambda}{n})^{-x} = 1 and limn(1λn)n=eλ=exp(λ)\lim\limits_{n\to \infty}(1-\frac{\lambda}{n})^{n} = e^{-\lambda} = \exp(-\lambda), that is, we have equation λxx!exp(λ)\frac{\lambda^x}{x!}\exp(-\lambda)

Intro to Continuous

A random variable XX is continuous if P(X=x)=0,xR P(X=x) = 0, \forall x\in \R

  • The probability function of continuous random variable called Probability Density Function(PDF) which write as f(x)=limΔx0P(x<X<x+Δx)Δxf(x) = \lim\limits_{\Delta x\to 0} \frac{P(x < X < x + \Delta x)}{\Delta x} and f(x)dx=1\int_{ - \infty}^{\infty} f(x)dx = 1

    • A density function     f(x)dx=1xR1,f(x)0\iff \int_{ - \infty}^{\infty} f(x)dx = 1 \land \forall x\in \R^1, f(x) \ge 0
  • The probability of a interval (a,b)(a,b) is the same as [a,b][a,b] which both are P(axb)=abf(x)dxP(a\le x\le b) = \int_a^bf(x)dx

JOINT Random Vairable

Let X,YX, Y be random variables, the joint distribution of XX and YY is the collection of probabilities P((X,Y)B),BR2P((X,Y) \in B), \forall B\subseteq \R^2

We also have CDF represent for it, where FX,Y(x,y)=P(Xx,Yy)=P(XxYy)F_{X,Y}(x,y) = P(X\le x, Y\le y) = P(X\le x \cap Y\le y)

For a<Xb,c<Yda < X \le b, c< Y \le d, the continuous random variables' probability of joint is P(a<Xb,c<Yd)=FX,Y(b,d)FX,Y(b,c)FX,Y(a,d)+FX,Y(a,c)P(a < X \le b, c< Y \le d) = F_{X,Y}(b,d)-F_{X,Y}(b,c)-F_{X,Y}(a,d)+F_{X,Y}(a,c), the distinct random variables' probability is pX,Y(x,y)=P(X=x,Y=y)p_{X,Y}(x,y) = P(X=x, Y= y)

Sometime it is too complicated to get the result, so that we have marginal distribution where the marginal distribution of XX is FX(x)=limyFX,Y(x,y)F_X(x) = \lim\limits_{y\to \infty}F_{X,Y}(x,y) , similarly, the marginal distribution of YY is FY(y)=limxFX,Y(x,y)F_Y(y) = \lim\limits_{x\to \infty}F_{X,Y}(x,y)

according to the CDF and the marginal CDF, we can write the probability function as fx,y(x,y)dxdy=1\int\int f_{x,y}(x,y)dxdy = 1 and the marginal pf of XX is fX(x)=yfX,Y(x,y)dyf_X(x) = \int_y f_{X,Y}(x,y) dy and the marginal pf of YY is fY(y)=XfX,Y(x,y)dxf_Y(y) = \int_X f_{X,Y}(x,y) dx

  • if X,YX,Y are independent, then fX,Y(x,y)=fX(x)fY(y)f_{X,Y}(x,y) = f_X(x)f_Y(y)

Order Statistics

Some order statistics example:

e.g. Since we want obtain more statistics, we need to order. Let X1,,XnX_1, \ldots, X_n be i.i.d random variables, let X(1),,x(n)X_{(1)}, \ldots, x_{(n)} ne ordered random variable from X1,,XnX_1, \ldots, X_n. Then X(1)X_{(1)} is the smallest and X(n)X_{(n)} is the largest.

  • FX(n)(x)=P(X(n)x)=P(X(1)x,X(2)x,,X(n)x)=P(X1x,,Xnx)=iP(Xix)=[FX1(x)]nF_{X_{(n)}}(x) = P(X_{(n)} \le x) = P(X_{(1)} \le x,X_{(2)} \le x,\ldots, X_{(n)} \le x) = P(X_1 \le x, \ldots, X_n \le x) = \prod_i P(X_i \le x) = [F_{X_1}(x)]^n since independent and largest less xx so that smallest less xx so that all equal to smallest
  • fX(n)(x)=ddxFX(n)(x)=n[FX1(x)]n1fX1(x)f_{X_{(n)}}(x) = \frac{d}{dx}F_{X_{(n)}}(x) = n[F_{X_1}(x)]^{n-1}f_{X_1}(x)
  • FX(1)(x)=P(X(1)x)=1P(X(1)>x)=1P(X(1)>x,X(2)>x,,X(n)>x)=P(X1>x,,Xn>x)=1iP(Xi>x)=1[1FX1(x)]nF_{X_{(1)}}(x) = P(X_{(1)} \le x) = 1 - P(X_{(1)} > x) = 1-P(X_{(1)} > x,X_{(2)} > x,\ldots, X_{(n)} > x) = P(X_1 > x, \ldots, X_n > x) = 1 - \prod_i P(X_i > x) = 1 - [1 - F_{X_1}(x)]^n
  • fX(1)(x)=ddxFX(1)(x)=n[1FX1(x)]n1fX1(x)f_{X_{(1)}}(x) = \frac{d}{dx}F_{X_{(1)}}(x) = n[1 - F_{X_1}(x)]^{n-1}f_{X_1}(x)

e.g. X1,,Xni.i.dU(0,1)X_1, \ldots, X_n \overset{i.i.d}\sim U(0,1), then fX(1)(X)=n(1x)n1=Γ(n+1)Γ(n)Γ(1)x11(1x)n1,fX(n)(X)=n(x)n1=Γ(n+1)Γ(n)Γ(1)xn1(1x)11f_{X_{(1)}}(X) = n(1-x)^{n-1} = \frac{\Gamma(n+1)}{\Gamma(n)\Gamma(1)} x^{1-1}(1-x)^{n-1},f_{X_{(n)}}(X) = n(x)^{n-1} = \frac{\Gamma(n+1)}{\Gamma(n)\Gamma(1)} x^{n-1}(1-x)^{1-1} so that X(n)Beta(n,1)X_{(n)} \sim Beta(n, 1) and X(1)Beta(1,n)X_{(1)} \sim Beta(1, n)

Events

Tail Events: Let assume A1,,AnSA_1, \ldots, A_n \subset S be a sequence of events. Then define the tail event lim supnAn=n=1k=nAk={An i.o}\limsup\limits_{n\to\infty} A_n = \bigcap_{n=1}^{\infty} \bigcup_{k=n}^{\infty} A_k = \{A_n \text{ i.o}\} and lim infnAk=n=1k=nAk={An a.a}\liminf\limits_{n\to\infty} A_k = \bigcup_{n=1}^{\infty} \bigcap_{k=n}^{\infty} A_k = \{A_n \text{ a.a}\}

  • P({An i.o. })=1P({Anc a.a. })P(\{A_n \text{ i.o. }\}) = 1 - P(\{A_n^c \text{ a.a. }\})
  • i.o. stand for infinite often, a.a stand for almost always
  • always > almost always > infinite often > almost never > never
  • i.o. stand for this event infinite often happen, a.a. stand for this event almost always happen

Borel-Cantelli Lemma:

  1. n=1P(An)<    P(An i.o)=0\sum_{n=1}^{\infty} P(A_n) < \infty \implies P(A_n \text{ i.o}) = 0. Then n=1P(XnX>ϵ)<    Xna.s.X\sum_{n=1}^{\infty} P(|X_n - X| > \epsilon) < \infty \implies X_n \overset{a.s.}\to X but converse is not true.
    • Assume n=1P(An)\sum_{n=1}^{\infty} P(A_n) \le \infty
    • P(A)=P(n=1m=nAm)=limnP(m=nAm)limnm=nP(Am)=0P(A) = P(\bigcap_{n=1}^{\infty}\bigcup_{m=n}^{\infty} A_m) = \lim\limits_{n\to\infty} P(\bigcup_{m=n}^{\infty} A_m) \le \lim\limits_{n\to\infty} \sum_{m=n}^{\infty} P(A_m) = 0 by drecreasing sequence of events and continunity from above.
  2. n=1P(An)=\sum_{n=1}^{\infty} P(A_n) = \infty and all AnA_n are independent     P(An i.o)=1\implies P(A_n \text{ i.o}) = 1
    • 1P(An i.o)=P(Anc a.a)=P(n=1m=nAmc)=limnP(m=nAmc)=limnlimkP(m=nkAmc)=limnlimkm=nkP(Amc)=limnlimkm=nk(1P(An))limnlimkm=nkeP(Am)limnem=nP(Am)e=01 - P(A_n \text{ i.o}) = P(A_n^c \text{ a.a}) = P(\bigcup_{n=1}^{\infty} \bigcap_{m=n}^{\infty} A_m^c) = \lim\limits_{n\to\infty} P(\bigcap_{m=n}^{\infty} A_m^c) = \lim\limits_{n\to\infty} \lim\limits_{k\to\infty} P(\bigcap_{m=n}^{k}A_m^c) = \lim\limits_{n\to\infty} \lim\limits_{k\to\infty} \prod_{m=n}^{k} P(A_m^c) = \lim\limits_{n\to\infty} \lim\limits_{k\to\infty} \prod_{m=n}^{k} (1 - P(A_n)) \le \lim\limits_{n\to\infty} \lim\limits_{k\to\infty} \prod_{m=n}^{k} e^{-P(A_m)} \le \lim\limits_{n\to\infty} e^{-\sum_{m=n}^{\infty} P(A_m)} \le e^{-\infty} = 0
    • that is, P(An i.o)=1P(A_n \text{ i.o}) = 1